package com.bbs.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.bbs.dto.PostAdd;
import com.bbs.dto.PostPreviewDto;
import com.bbs.dto.PostQuery;
import com.bbs.pojo.Post;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bbs.pojo.Result;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author shardemachael
 * @since 2022-04-16
 */
@Service
public interface IPostService extends IService<Post> {
    /**
     * 添加帖子接口
     * @param postAdd
     * @return
     * @throws Exception
     */
    Result<Object> addPost(PostAdd postAdd) throws Exception;

    IPage<PostPreviewDto> getPosts(PostQuery postQuery);
}
